package se.webbzon.boltzmann.battle.object.status;

import se.webbzon.boltzmann.battle.property.BattleProperty;
import se.webbzon.oschi01.worldobject.WorldStaticObject;

public class BattleStatusBar extends WorldStaticObject {
	
	/*============================================================
	Constructors
	============================================================*/
	
	/** Creates a new battle status bar. **/
	public BattleStatusBar(BattleProperty property)  {
		super(0,0,new BattleStatusBarAppearance());
		setPosition(0,2,0);
		setSize(1,0.25,1);
		setStatus(	property.getHealth(),property.getEnergy(),
					property.getMaxHealth(),property.getMaxEnergy());
	}
	
	/*============================================================
	Public Methods
	============================================================*/
	
	/** Sets the status of the status bar. **/
	public void setStatus(int health, int energy, int maxHealth, int maxEnergy) {
		((BattleStatusBarAppearance) getAppearance()).
				setStatus(health, energy, maxHealth, maxEnergy);
	}

}
